package com.luojing.springcloud;

import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.cloud.netflix.eureka.EnableEurekaClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.cloud.stream.annotation.EnableBinding;
import org.springframework.cloud.stream.annotation.StreamListener;
import org.springframework.cloud.stream.messaging.Sink;
import org.springframework.cloud.stream.messaging.Source;

@SpringBootApplication
@EnableEurekaClient
@EnableFeignClients
@EnableBinding({Sink.class, Source.class})
public class KaleidoscopeCenterApplication {

	public static void main(String[] args) {
		SpringApplication.run(KaleidoscopeCenterApplication.class, args);
	}


	@StreamListener(Sink.INPUT)
	public void log(String payload) {
		System.out.println("Receive:" + payload);
	}
}
